import http from '@/api'

// 获取分类文章
export const cateArticleApi  = (data) => http.get('/main/query/obtain', data)

// 搜索文章
export const searchResultApi  = (data) => http.get('/main/query/obtain', data)

// 获取文章详情
export const articleDetailsApi  = (data) => http.get('/main/query/details', data)

// 文章评论
export const commentApi  = (data) => http.post('/zh/ption/comment', data)

// 关注
export const followApi  = (data) => http.post('/zh/ption/follow', data)

// 发布文章
export const addArticleApi  = (data) => http.post('/zh/ption/release', data)

// 历史记录
export const historyApi  = (data) => http.get('/zh/ption/history', data)

// 我的收藏
export const collectionApi  = (data) => http.get('/zh/ption/obtain', data)

// 获取用户发布文章
export const articleApi  = (data) => http.get('/zh/ption/zp', data)

// 获取我的数据
export const userDataApi  = (data) => http.get('/zh/ption/hdata')

// 修改文章
export const uploadArticleApi  = (data) => http.post('/zh/ption/release2', data)

// 删除文章
export const delrticleApi  = (data) => http.post('/zh/ption/delete', data)